<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:c="http://java.sun.com/jsp/jstl/core"
	  xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>BEK - Login</title>
	<meta name="viewport" content="width=device-width,initial-scale=1" />
	<h:outputStylesheet library="bootstrap" name="css/bootstrap.min.css" />
	<style type="text/css">
		 /* body{background-color: #F7F7F6;}
		.login{padding-top: 65px;}
		.center{float: none; margin-left: auto; margin-right: auto;} */
		
		
		body {
	background: #eee !important;	
}

.wrapper {	
	margin-top: 80px;
  margin-bottom: 80px;
}

.form-signin {
  max-width: 380px;
  padding: 15px 35px 45px;
  margin: 0 auto;
  background-color: #fff;
  border: 1px solid rgba(0,0,0,0.1);  

  .form-signin-heading,
	.checkbox {
	  margin-bottom: 30px;
	}

	.checkbox {
	  font-weight: normal;
	}

	.form-control {
	  position: relative;
	  font-size: 16px;
	  height: auto;
	  padding: 10px;
		include box-sizing(border-box);

		:focus {
		  z-index: 2;
		}
	}

	input[type="text"] {
	  margin-bottom: -1px;
	  border-bottom-left-radius: 0;
	  border-bottom-right-radius: 0;
	}

	input[type="password"] {
	  margin-bottom: 20px;
	  border-top-left-radius: 0;
	  border-top-right-radius: 0;
	}
	
	footer.navbar-default.navbar-fixed-bottom
 {
      background:red;
      color:white;
      padding:1em 0;
 }
 footer.navbar-default.navbar-fixed-bottom p
 {
      margin:0;
 }
}
	</style>
</h:head>
<h:body>
	
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-header"> 
			<a class="navbar-brand" href="#">BEK - Administração</a> 
		</div> 
	</nav>
		
	
	<div class="wrapper">
	    <form id="login" method="post" action="#{request.contextPath}/j_spring_security_check" class="form-signin">       
		      <h2 class="form-signin-heading">Por favor, faça login</h2>
		      
		      
		      <h:panelGroup rendered="#{!empty param.login_error}">
		            <div class="alert alert-error">
		                <a class="close" data-dismiss="alert" href="#">×</a>Erro ao efetuar login!
		            </div>
					<br/> <br/>
					Motivo: #{SPRING_SECURITY_LAST_EXCEPTION.message}
				</h:panelGroup>
				
				
		      <div class="form-group">
			      <input type="text" id="j_username" class="form-control" name="j_username" placeholder="Username"  />
		      </div>
		      
		      <div class="form-group">
		    		<input type="password" id="j_password" class="form-control" name="j_password" placeholder="Password" />
			  </div>
		      
		      <div class="form-group">
			      <label class="checkbox">
			      	<input type="checkbox" name="_spring_security_remember_me" /> Entrar automaticamente
			      </label>
		      </div>
		      
		      <div class="form-group">
		      	<button type="submit" name="submit" class="btn btn-primary btn-block">Entrar</button>
		      </div>
		      
		       <script>
						document.getElementById("login").j_username.value = "#{SPRING_SECURITY_LAST_USERNAME}";
				</script>
	    </form>
  </div>
	
	<!-- <p class="text-center muted "> Copyright 2014 - Buritis Espaço Kids - BEK</p>
	Main Container Ends
	 <div class="panel-footer">Rodapé</div> -->
	<!-- <footer>
      <div class="container">
        <p class="text-muted">Place sticky footer content here.</p>
      </div>
    </footer> -->
    
    
    <footer class="navbar-default navbar-fixed-bottom">
      <div class="container">
        <p class="text-center muted ">Buritis Espaço Kids</p>
      </div>
	</footer>


	<h:outputScript library="bootstrap" name="js/bootstrap.min.js"/>
	
</h:body>
</html>